package android.dj.lbscamera.entities;

import org.json.JSONObject;

import android.dj.lbscamera.network.ResourceManager;

public class User {
	private String uid = "10000";
	private String username;
	private String nickname;
	private String password;
	private String mBirthday;
	private String mWebSite;
	private String mHeadImgUrl;
	private String mIntroduction;

	public String getmIntroduction() {
		return mIntroduction;
	}

	public void setmIntroduction(String mIntroduction) {
		this.mIntroduction = mIntroduction;
	}

	public String getmWebSite() {
		return mWebSite;
	}

	public void setmWebSite(String mWebSite) {
		this.mWebSite = mWebSite;
	}

	public String getmHeadImgUrl() {
		return mHeadImgUrl;
	}

	public void setmHeadImgUrl(String mHeadImg) {
		this.mHeadImgUrl = mHeadImg;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getmBirthday() {
		return mBirthday;
	}

	public void setmBirthday(String mBirthday) {
		this.mBirthday = mBirthday;
	}

	public String UserRegister(String username, String nickname, String password) {
		String result = null;
		try {
			result = ResourceManager.getInstance().doRegister(username,
					password, nickname);
			JSONObject mJson = new JSONObject(result);
			result = mJson.getString("result");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}

	public String UserLogin(String username, String password) {
		String result = null;
		try {
			result = ResourceManager.getInstance().doLogin(username, password);
			JSONObject mJson = new JSONObject(result);
			result = mJson.getString("result");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}

}
